package com.jerry.basic.type;

public class BasicTypeInfo {
   public static void main(String[] args){
	   run();
	   change();
	   octonary();
   }
   
   /*
    * byte short char are the same level
    */
   public static void run(){//must static method when running in main 
	   //illegal modifier for parameter,only final is permitted,
	   //nether static method nor non-static method.
	   //static final int a = 10; 
       short i = 99;
       char ch = (char)i;
       System.out.println(ch);
   }
   /*
    * change between basic type,can use wrapper class
    */
   public static void change(){
	   double d = 100.00;
	   Double dl = new Double(d);
	   int i = dl.intValue();
	   System.out.println(i);
   }
   
   public static void octonary(){
	   //078 is an octal number,so 8 can not appear.
	   //int i = 078;
	   
	   int i = 077;
	   System.out.println(i);
   }
}
